.mobile {
  display: none;
}

.challenge-navbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 4px 0 rgb(0 0 0 / 10%);

  .left {
    display: flex;
    flex: 1;
    gap: 0.5rem;
    align-items: center;

    .back {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      color: black;
      transform: scaleY(2);
    }

    img {
      width: 2rem;
      height: 2rem;
    }

    .logo {
      height: 2rem;
    }
  }

  h1 {
    margin: 0;
    font-weight: 500;
    color: var(--text-body);
  }

  .right {
    flex: 1;

    input {
      display: none;
    }

    .menu {
      display: flex;
      gap: 1.5rem;
      align-items: center;

      a {
        display: flex;
        gap: 1rem;
        align-items: center;
        text-decoration: none;

        img {
          width: 2rem;
          height: 2rem;
        }
      }
    }

    .responsive_nav {
      display: flex;
      align-items: center;
      justify-content: end;
    }
  }
}

@media (width <= 640px) {
  .mobile {
    display: block;
  }

  .challenge-navbar {
    padding: 1rem 1rem 1rem 0.5rem;

    .logo {
      display: none;
    }

    h1 {
      font-size: 1.25rem;
    }
  }

  .right {
    .responsive_nav {
      position: relative;
      display: block;
      margin-left: 2rem;
    }

    .hamburger {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      align-items: flex-end;
      justify-content: center;

      input {
        position: absolute;
        z-index: 3;
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        margin: 0;
        cursor: pointer;
        opacity: 0;
      }

      div.line {
        position: relative;
        z-index: 2;
        width: 1.25rem;
        height: 2px;
        background-color: #0e0615;
        border-radius: 7px;
        transform-origin: 4px 0;
      }

      div.cross {
        z-index: 2;
        margin-right: 0.25rem;
        transform: scale(1.4);
      }

      input:not(:checked) ~ div.line {
        display: block;
      }

      input:not(:checked) ~ div.cross {
        display: none;
      }

      input:checked ~ div.line {
        display: none;
      }

      input:checked ~ div.cross {
        display: block;
      }
    }

    .menu {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 1;
      flex-direction: column;
      width: 100%;
      height: 100vh;
      padding: 2rem;
      padding-top: 6rem;
      background-color: #fff;
      transform: translateX(100%);
      transition: transform 0.33s ease-in-out;
    }

    .hamburger input:checked ~ .menu {
      transform: none;
    }
  }
}
